//
//  SNCommentToolBar.m
//  DayDayHappy
//
//  Created by yutao on 14-3-4.
//  Copyright (c) 2014年 yutao. All rights reserved.
//

#import "SNCommentToolBar.h"
#import "SNLineView.h"
@implementation SNCommentToolBar

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        
        SNLineView *line = [[SNLineView alloc] initWithFrame:CGRectMake(0, 0, kDeviceWidth, 0.5)];
        line.backgroundColor = kHappTextClolr;
        [self addSubview:line];
        
        UIView *placeHodelBg = [[UIView alloc] initWithFrame:CGRectMake(15, 8, 290, 33)];
        [placeHodelBg setBackgroundColor:[UIColor whiteColor]];
        placeHodelBg.layer.borderWidth = 0.5;
        placeHodelBg.layer.borderColor = kHappTextClolr.CGColor;
        [self addSubview:placeHodelBg];
        
        UILabel *placeHodelLab = [[UILabel alloc] initWithFrame:CGRectMake(5, 1, 285, 31)];
        [placeHodelLab setText:@"我来说两句..."];
        [placeHodelLab setTextColor:kHappTextClolr];
        [placeHodelLab setBackgroundColor:[UIColor whiteColor]];
        [placeHodelBg addSubview:placeHodelLab];
        
        
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toolbarDidTap)];
        [self addGestureRecognizer:tap];
    }
    return self;
}



- (void)toolbarDidTap
{
    if ([self.delegate respondsToSelector:@selector(commentToolBarDidSelected:)]) {
        [self.delegate commentToolBarDidSelected:self];
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
